package com.example.demo.entity.viewobject;


import com.example.demo.entity.Articleinfo;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;


@EqualsAndHashCode(callSuper = true)
@Data
public class ArticleinfoVO extends Articleinfo implements Serializable {
    // Serializable 接口是一个空接口 表示当前实体类可以被序列化. 创建一个实体类时最好实现该接口.
    // 实现该接口最好再加上下面这一个属性:
    private final long serializable = 1L;

    // Articleinfo 没有的属性
    private String username; // 文章作者.

    @Override
    public String toString() {
        return "ArticleinfoVO{" +
                "username='" + username + '\'' +
                "} " + super.toString();
    }

    //    private int id;
//    private String title;
//    private String content;
//    private LocalDateTime createtime;
//    private LocalDateTime updatetime;
//    private int userid;
//    private int rcount;
//    private int state;
}
